package net.happy2v.louis.re.tabmenu;

import net.happy2v.louis.re.tabmenu.common.TabBaseListActivity;
import net.happy2v.louis.re.tabmenu.tab4.Tab4Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class TabMenuActivity extends TabActivity {

	private final String TAG_TAB_WORD = "tab_word";
	private final String TAG_TAB_SENTENCE = "tab_sentence";
	private final String TAG_TAB_TODAY_SENTENCE = "tab_today_sentence";
	private final String TAG_TAB_MP3 = "tab_mp3";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		final TabHost tabHost = getTabHost();

		tabHost.addTab(tabHost
				.newTabSpec(TAG_TAB_WORD)
				.setIndicator("단어")
				.setContent(
						new Intent(this, TabBaseListActivity.class).putExtra(
								TabBaseListActivity.INTENT_EXTRA_TAB_TYPE,
								TabBaseListActivity.INTENT_EXTRA_TAB_TYPE_WORD)));
		tabHost.addTab(tabHost
				.newTabSpec(TAG_TAB_SENTENCE)
				.setIndicator("문장")
				.setContent(
						new Intent(this, TabBaseListActivity.class)
								.putExtra(
										TabBaseListActivity.INTENT_EXTRA_TAB_TYPE,
										TabBaseListActivity.INTENT_EXTRA_TAB_TYPE_SENTENCE)));
		tabHost.addTab(tabHost.newTabSpec(TAG_TAB_TODAY_SENTENCE)
				.setIndicator("지문")
				.setContent(new Intent(this, TabBaseListActivity.class)));
		tabHost.addTab(tabHost.newTabSpec(TAG_TAB_MP3).setIndicator("MP3")
				.setContent(new Intent(this, Tab4Activity.class)));
	}
}